package com.qipay.cpaccount;


import com.qipay.baas.model.CpAccount;
import com.qipay.baas.model.CpWithdrawTradlog;
import com.qipay.baas.model.Order;
import org.springframework.transaction.annotation.Transactional;

public interface CpAccountService {
    CpAccount get(long id);

    int update(CpAccount cpAccount);

    void create(CpAccount cpAccount);

    void setOrderSuccess(Order order);

    void setWithdrawApply(CpWithdrawTradlog cpWithdrawTradlog);

    void setWithdrawFail(CpWithdrawTradlog cpWithdrawTradlog);

    @Transactional
    void setOrderDone(Order order);

    @Transactional
    void adjust(Long cpId, Long balance, Long balanceAvailable, Long balanceAdvance, Long balanceDisabled, Long balanceAdvanceWidthdraw);
}
